<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProjectAlbum.aspx.cs" Inherits="Admin_ProjectAlbum" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Choose a Project Album</title>
</head>
<body>
    <form id="form1" runat="server">
    
   

	

		

		
			<h3>Your Albums</h3>
			
			<p>The following are the albums	currently on your site. Click <b>Edit</b> to modify the pictures in each 
			album. Click <b>Delete</b> to permanently remove the album and all of its pictures</p>
			
			<asp:gridview id="GridView1" runat="server"
				datasourceid="ObjectDataSource1" datakeynames="AlbumID" cellpadding="6"
				autogeneratecolumns="False" BorderStyle="None" BorderWidth="0px" width="420px" showheader="false">
				<EmptyDataTemplate>
				You currently have no albums.
				</EmptyDataTemplate>
				<EmptyDataRowStyle CssClass="emptydata"></EmptyDataRowStyle>
				<columns>
					<asp:TemplateField>
						<ItemStyle Width="116" />
						<ItemTemplate>
							<table border="0" cellpadding="0" cellspacing="0" class="photo-frame">
								<tr>
									<td class="topx--"></td>
									<td class="top-x-"></td>
									<td class="top--x"></td>
								</tr>
								<tr>
									<td class="midx--"></td>
									<td>
										<img src="../Handler.ashx?AlbumID=<%# Eval("AlbumID") %>&Size=S" class="photo_198" style="border:4px solid white" alt="Sample Photo from Album Number <%# Eval("AlbumID") %>" /></td>
									<td class="mid--x"></td>
								</tr>
								<tr>
									<td class="botx--"></td>
									<td class="bot-x-"></td>
									<td class="bot--x"></td>
								</tr>
							</table>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField>
						<ItemStyle Width="280" />
						<ItemTemplate>
							<div style="padding:8px 0;">
								<b><%# Server.HtmlEncode(Eval("Caption").ToString()) %></b><br />
								<%# Eval("Count") %> Photo(s)<asp:Label ID="Label1" Runat="server" Text=" Public" Visible='<%# Eval("IsPublic") %>'></asp:Label>
							</div>
							<div style="width:100%;text-align:right;">
                                <input id="Button1" type="button" value="Select" onclick="window.opener.document.forms[0].elements['ctl00_Main_hfiAlbumID'].value =<%# Eval("AlbumID") %>;window.opener.document.forms[0].elements['ctl00_Main_tboAlbum'].value ='<%# Eval("Caption").ToString() %>';window.close();" />
							</div>
						</ItemTemplate>						
					</asp:TemplateField>
				</columns>
			</asp:gridview>
		

	
	
	<asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager" 
		SelectMethod="GetAlbums"
		InsertMethod="AddAlbum" 
		DeleteMethod="RemoveAlbum" 
		UpdateMethod="EditAlbum" >
	</asp:ObjectDataSource>
   
    </form>
</body>
</html>
